const muent = import.meta.glob('@/views/**/page.js',{
	eager:true,
	import:'default'
})

const router = Object.entries(muent).map(([path,mate])=>{
	const name = path.replace('/src/views/','').replace('/page.js','');
	path = '/' + mate.pathName;
	return {
		path,
		name,
		mate,
	}
})


function generateTreeData(depth, branch, parentId = '') {
	if (depth === 0) return [];
	
	const result = [];
	for (let i = 1; i <= branch; i++) {
		const id = parentId ? `${parentId}-${i}` : `${i}`;
		const node = {
			id: id,
			name: `节点 ${id}`,
			children: generateTreeData(depth - 1, branch, id)
		};
		result.push(node);
	}
	return result;
}
// console.log(muent,'88888',generateTreeData(3,3))
export default router//routerViews;